{%extends "admin/base.html"%}
{% load i18n %}

{%block content%}
<div class="wrap">
	<h2 class="title1">{% trans "Change password" %}</h2>
	{% if messages %}
	<ul class="messages">
		{% for message in messages %}
		<li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li>
		{% endfor %}
	</ul>
	{% endif %}
	
	<form method="post" action="{{ blog.get_admin_change_password_url }}">
		<div class="dashboard-window" style="width: 60%;">
			<h3>{% trans "Change password" %}</h3>
			<div class="inside">
				<table class="form-table2">
					<tr>
						<th>{{ passwordform.old_password.label_tag }}</th>
						<td {% if passwordform.old_password.errors %}class="error"{% endif %}>{{ passwordform.old_password }}</td>
						<td class="error-col">
							{% if passwordform.old_password.errors %}{{ passwordform.old_password.errors }}{% endif %}</td>
					</tr>
					<tr>
						<th>{{ passwordform.new_password1.label_tag }}</th>
						<td {% if passwordform.new_password1.errors %}class="error"{% endif %}>{{ passwordform.new_password1 }}</td>
						<td>{% if passwordform.new_password1.errors %}{{ passwordform.new_password1.errors }}{% endif %}</td>
					</tr>
					<tr>
						<th>{{ passwordform.new_password2.label_tag }}</th>
						<td {% if passwordform.new_password2.errors %}class="error"{% endif %}>{{ passwordform.new_password2 }}</td>
						<td>{% if passwordform.new_password2.errors %}{{ passwordform.new_password2.errors }}{% endif %}</td>
					</tr>
				</table>
			</div>
		</div>
		<p class="submit">
			<input type="submit" name="submit" value="{% trans 'Save' %}" class="button-primary">
		</p>
	</form>
</div>
{%endblock%}